package com.xja.controller;

import com.xja.pojo.Task;
import com.xja.server.TaskServer;
import compents.RespApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestController {

    @Autowired
    private TaskServer taskServer;

    @GetMapping("test")
    public RespApi test(){
        List<Task> taskList = taskServer.findAll();
        return RespApi.success(taskList);
    }

}
